<template>
	<view class="cardunit">
		<uni-popup ref="pop1" zindex :is-show="props.isShow">
			<view class="ordetailModal text-left">
				<view class="text-bold">项目收费说明</view>
				<!-- <view class="text-c9 orjcalc flex align-center solid-bottom"><view class="">项目收费 = 基础收费 + 加收费</view></view> -->
				<text class="cuIcon-close closeIco" @click="close"></text>
				<view class="ord_meg_box padding-top-sm act">
					<view class="ormsg_item flex align-center">
						<view class="ormtit">基础项目</view>
						<view class="flex-sub text-end text-bold">￥{{ (mndata.nmoney || 0)-(mndata.lever_money || 0) }}</view>
					</view>
					<!-- <view v-if="mndataInfo.room_total_money && mndataInfo.room_total_money > 0" class="ormsg_item flex align-center">
						<view class="ormtit">房费</view>
						<view class="flex-sub text-end">+￥{{ mndataInfo.room_total_money || '0' }}</view>
					</view> -->
					<view class="ormsg_item flex align-center">
						<view class="ormtit">等级加收费</view>
						<view class="flex-sub text-end">￥{{ mndata.lever_money || '0' }}</view>
					</view>
					<!-- <view class="ormsg_item flex align-center">
						<view class="ormtit">手法加收费</view>
						<view class="flex-sub text-end">￥{{ mndata.skill_money || '0' }}</view>
					</view> -->
					<view v-if="mndata.add_money && mndata.add_money > 0" class="ormsg_item flex align-center">
						<view class="ormtit">加点</view>
						<view class="flex-sub text-end">￥{{ mndata.add_money || '0' }}</view>
					</view>
					<view class="ormsg_item flex align-center">
						<view class="ormtit">小计</view>
						<view class="flex-sub text-end">
							<view class="d_ib">
								<view class="text-bold">￥{{ mndata.nmoney || '0' }}</view>
								<view class="text-end text-xs text-c9">
									{{ mndata.price_type == 1049 ? '(会员价)' : mndata.price_type == 1050 ? '(小程序价)' : mndata.price_type == 1051 ? '(现金价)' : '' }}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script lang="ts" setup>
	import { ref,watch } from "vue";
	const emit = defineEmits([""])
	const props = defineProps({
		type: {
			type: String,
			default: 'modal'
		},
		// list: {
		// 	type: Array,
		// 	default: ()=>[]
		// },
		ndata: {
			type: Object,
			default: () => {}
		},
		ndataInfo: {
			type: Object,
			default: () => {}
		},
		// ndataString: {
		// 	type: String,
		// 	default: ''
		// },
		showClose: {
			type: Boolean,
			default: false
		},
		// nzIndex:{
		// 	type: Boolean,
		// 	default: false
		// },
		// aover:{
		//   type: Boolean,
		//   default: false
		// },
		isShow: {
			type: Boolean,
			default: false
		},
		canClose: {
			type: Boolean,
			default: true
		}
	})
	const mndata=ref<any>({})
	const mndataInfo=ref<any>({})
	const pop1=ref()
	watch(
		() => props.ndata, // 观察的源
		(e) => {
				mndata.value = e;
		}
	);
	watch(
		() => props.ndataInfo, // 观察的源
		(e) => {
				mndataInfo.value = e;
		}
	);
	const open=()=>{
		pop1.value.open();
	}
	const close=()=>{
		pop1.value.close();
	}
  defineExpose({ open, close })
</script>

<style lang="scss" scoped>
.ordetailModal {
	min-height: 400rpx;
	// padding-top: 38rpx;
	padding: 38rpx 40rpx 20rpx 30rpx;
	background-color: #fff;
	width: 80vw;
	border-radius: 10rpx;
	position: relative;
	.orjcalc {
		height: 100rpx;
	}
	.ormsg_item {
		color: #666;
		height: 66rpx;
	}
	.ormtit {
		width: 200rpx;
	}
}
.closeIco{
	position: absolute;
	right:20rpx;
	top:20rpx;
	color: #333;
	font-size: 38rpx;
}
</style>